Ext.define('byb.view.system.ModifyPassword', {
    extend: "Ext.window.Window",
    alias: 'widget.modifyPassword',
    autoShow: true,
    frame: false,
    modal: true,
    title: '修改密码',
    width: 250,
    height:220,
    initComponent: function() {
        this.callParent(arguments);
    }
    ,items:[{
           xtype: 'form',
           border: false,
           frame: false,
           fieldDefaults: {
               labelAlign: 'right',
               labelWidth: '60px',
               allowBlank: false,
               margin: '10',
               width: '200px'
           },
           items: [{
               	xtype: 'textfield',
                inputType: "password",
               	name:'password',
                maxLength: 64,
               	minLength:6,
               	allowBlank: false,
               	fieldLabel:'旧密码'
           }
           ,{
               	xtype: 'textfield',
                inputType: "password",
               	name:'newPassword',
                maxLength: 64,
               	minLength:6,
               	allowBlank: false,
               	fieldLabel:'新密码',
               	id: 'newPassword'
           }
           ,{ 
        	    xtype: 'textfield',
               	name:'confirmPassword',
                maxLength: 64,
                inputType: "password",
               	fieldLabel:'确认密码',
               	minLength:6,
                vtype:'password',
                vtypeText:"两次密码不一致！",
                initialPassField: 'newPassword', 
                allowBlank:false
           }]
    }]
    // Reset and Submit buttons
    ,buttons: [{
        text: '确定',
        action: "itemSave",
        id : 'modifyPasswordBtn'
    }, {
        text: '取消',
        handler:function(){
        	Ext.ComponentQuery.query('modifyPassword')[0].close();
        }
    }]
});